<?php
// +----------------------------------------------------------------------
// | 闭馆 模型
// +----------------------------------------------------------------------
namespace app\wechat\model;

use think\Model;

class Close extends Model{
    /**
     * 获取包含该时间段闭馆数据
     * @param int $stime 开始时间戳
     * @param int $etime 结束时间戳
     * @return obj
     */
    public function getCloseArea($stime,$etime){
        $open = new Close;
        $res = $open->where('','exp',"(starttime < $stime AND endtime >$stime) OR ( starttime < $etime AND endtime > $etime)")->field('group')->select();
        return $res;
    }
}